package com.hzlj.position.locate.dao;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fz.common.base.converter.QueryWrapperConverterPlus;
import com.hzlj.position.locate.common.dto.abnNightActivityJzry.AbnNightActivityJzryQueryResultDTO;
import com.hzlj.position.locate.common.model.AbnNightActivityJzry;
import com.hzlj.position.locate.mapper.AbnNightActivityJzryMapper;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;

/**
 * 定位分析-夜间活动表-人员信息(AbnNightActivityJzry)表操作类
 *
 * @author lifh
 * @date 2023-10-17 17:38:35
 */
@Repository
public class AbnNightActivityJzryDao extends ServiceImpl<AbnNightActivityJzryMapper, AbnNightActivityJzry> {
    @Resource
    private AbnNightActivityJzryMapper abnNightActivityJzryMapper;


    public List<AbnNightActivityJzryQueryResultDTO> listAbnNightActivityJzry(String nightActivityId) {
        return QueryWrapperConverterPlus.of(abnNightActivityJzryMapper)
                .list(AbnNightActivityJzryQueryResultDTO.class, null, q ->
                        q.eq(AbnNightActivityJzry::getNightActivityId, nightActivityId)
                                .orderByAsc(AbnNightActivityJzry::getPositionTime)
                );
    }
}

